import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lily
 * Date: 2024-10-13
 * Time: 23:48
 */
public class test_3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int t = in.nextInt();
            int[] arr = new int[6];
            while (t-- > 0) {
                for (int i = 0; i < 6; i++) {
                    arr[i] = in.nextInt();
                }
                Arrays.sort(arr);
                if (arr[0] + arr[1] > arr[2] && arr[3] + arr[4] > arr[5] ||
                        arr[0] + arr[2] > arr[3] && arr[1] + arr[4] > arr[5]||
                        arr[0] + arr[3] > arr[4] && arr[1] + arr[2] > arr[5]||
                        arr[0] + arr[4] > arr[5] && arr[1] + arr[2] > arr[3]) {
                    System.out.println("Yes");
                } else {
                    System.out.println("No");
                }
            }
        }
    }
}
